/*
package com.item.model.handler;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Slf4j
@Component
public class DBMateObjectHandler implements MetaObjectHandler {

    */
/**
     * 阿里规约中指定的，创建时间和修改时间自动化完成
     * 插入时的填充策略
     *//*


    @Override
    public void insertFill(MetaObject metaObject) {
        log.info("start insert fill.....");
        this.strictInsertFill(metaObject, "gmt_create", LocalDateTime.class, LocalDateTime.now());
        this.strictInsertFill(metaObject, "gmt_modified", LocalDateTime.class, LocalDateTime.now());

    }
    // 更新时的填充策略
    @Override
    public void updateFill(MetaObject metaObject) {
        log.info("start update fill.....");
        try {
            if (metaObject.hasSetter("setGmtCreate")) {
                log.debug("自动插入 updateTime");
                metaObject.setValue("setGmtCreate", null);
                this.strictUpdateFill(metaObject, "gmt_modified", LocalDateTime.class, LocalDateTime.now()); // 起始版本 3.3.0(推荐使用)
            }
        } catch (Exception e) {
            log.error("自动注入失败:", e);
        }
    }
}*/
